Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.
Name | setTonePolyphony() |
||
---|---|---|---|
Examples | void setup() { // sets the max number of tones to play to 2 setTonePolyphony(2); // generates a 400Hz tone in output pin 8 with infinite duration tone(8, 400); // generates a 1000Hz tone in output pin 9 with infinite duration tone(9, 1000); } void loop() { } |
||
Description | The setTonePolyphony() sets the max number of tones to play, max is limited by the number of timers on the board. If a previous tone command is playing, and a new pin is specified, and tonePolyphony has been set to > 1, and there are available timers, a simultaneous tone will be played on the new pin. | ||
Syntax | setTonePolyphony(tones)
|
||
Parameters |
|
||
Returns | None | ||
Usage | Application | ||
Related | tone() noTone() setTonePolyphony() getTonePolyphony() |